
<h1><span class="yiyi-st" id="yiyi-12">numpy.radians</span></h1>
        <blockquote>
        <p>原文：<a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.radians.html">https://docs.scipy.org/doc/numpy/reference/generated/numpy.radians.html</a></p>
        <p>译者：<a href="https://github.com/wizardforcel">飞龙</a> <a href="http://usyiyi.cn/">UsyiyiCN</a></p>
        <p>校对：（虚位以待）</p>
        </blockquote>
    
<dl class="data">
<dt id="numpy.radians"><span class="yiyi-st" id="yiyi-13"> <code class="descclassname">numpy.</code><code class="descname">radians</code><span class="sig-paren">(</span><em>x</em><span class="optional">[</span>, <em>out</em><span class="optional">]</span><span class="sig-paren">)</span><em class="property"> = &lt;ufunc &apos;radians&apos;&gt;</em></span></dt>
<dd><p><span class="yiyi-st" id="yiyi-14">将角度从度转换为弧度。</span></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name">
<col class="field-body">
<tbody valign="top">
<tr class="field-odd field"><th class="field-name"><span class="yiyi-st" id="yiyi-15">参数：</span></th><td class="field-body"><p class="first"><span class="yiyi-st" id="yiyi-16"><strong>x</strong>：array_like</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-17">输入数组，以度为单位。</span></p>
</div></blockquote>
<p><span class="yiyi-st" id="yiyi-18"><strong>out</strong>：ndarray，可选</span></p>
<blockquote>
<div><p><span class="yiyi-st" id="yiyi-19">与<em class="xref py py-obj">x</em>形状相同的输出数组。</span></p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name"><span class="yiyi-st" id="yiyi-20">返回：</span></th><td class="field-body"><p class="first"><span class="yiyi-st" id="yiyi-21"><strong>y</strong>：ndarray</span></p>
<blockquote class="last">
<div><p><span class="yiyi-st" id="yiyi-22">相应的弧度值。</span></p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title"><span class="yiyi-st" id="yiyi-23">也可以看看</span></p>
<dl class="last docutils">
<dt><span class="yiyi-st" id="yiyi-24"><a class="reference internal" href="numpy.deg2rad.html#numpy.deg2rad" title="numpy.deg2rad"><code class="xref py py-obj docutils literal"><span class="pre">deg2rad</span></code></a></span></dt>
<dd><span class="yiyi-st" id="yiyi-25">等效函数</span></dd>
</dl>
</div>
<p class="rubric"><span class="yiyi-st" id="yiyi-26">例子</span></p>
<p><span class="yiyi-st" id="yiyi-27">将度数组转换为弧度</span></p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">deg</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">arange</span><span class="p">(</span><span class="mf">12.</span><span class="p">)</span> <span class="o">*</span> <span class="mf">30.</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">np</span><span class="o">.</span><span class="n">radians</span><span class="p">(</span><span class="n">deg</span><span class="p">)</span>
<span class="go">array([ 0.        ,  0.52359878,  1.04719755,  1.57079633,  2.0943951 ,</span>
<span class="go">        2.61799388,  3.14159265,  3.66519143,  4.1887902 ,  4.71238898,</span>
<span class="go">        5.23598776,  5.75958653])</span>
</pre></div>
</div>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">out</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">zeros</span><span class="p">((</span><span class="n">deg</span><span class="o">.</span><span class="n">shape</span><span class="p">))</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ret</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">radians</span><span class="p">(</span><span class="n">deg</span><span class="p">,</span> <span class="n">out</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">ret</span> <span class="ow">is</span> <span class="n">out</span>
<span class="go">True</span>
</pre></div>
</div>
</dd></dl>
